package me.zk.practice1.hw;

import java.util.Arrays;
import java.util.Scanner;

public class HWBJJ26 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int len = Integer.parseInt(scanner.nextLine());
        int[] nums = new int[len];

        int count = 0;

        int sum = 0;

        int min = Integer.MAX_VALUE;
        for (int i = 0; i < len; i++) {
            nums[i] = scanner.nextInt();
            count^=nums[i];
            sum+=nums[i];
            min = Math.min(min,nums[i]);
        }
        if (count!=0) {
            System.out.println("NO");
        } else {
            System.out.println(sum-min);
        }

    }
}
